import request from '@/utils/request'

/**
 * 修改密码
 * @param {*} userId 用户id
 * @param {*} userPassword 新的密码
 * @returns 
 */
export const changePassword = function(userId, userPassword) {
    return request({
        method: 'post',
        url: '/UserManage/updatePassword',
        data: {
            userId,
            userPassword
        }

    })
}


/**
 * 获取照片
 * @returns 
 */
export const getPhoto = function() {
    return request({
        method: 'get',
        url: '/UserManage/showPhoto',
        responseType: "blob",
        headers: {
            "Content-type": "image/jpeg;charset=utf-8",
        }
    })
}

export const getPwdHistory = function() {
    return request({
        method: 'get',
        url: '/UserManage/getPwdHistorys',
    })
}